package team.freeroom.hotelmanage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import team.freeroom.hotelmanage.repository.entity.RoomType;
import team.freeroom.hotelmanage.repository.mapper.RoomTypeMapper;
import team.freeroom.hotelmanage.service.RoomTypeService;
import java.util.List;
import java.util.Map;

@Service
public class RoomTypeServiceImpl implements RoomTypeService {
    @Autowired
    private RoomTypeMapper roomTypeMapper;

    @Override
    public int add(RoomType roomType) {
        return roomTypeMapper.add(roomType);
    }

    @Override
    public int edit(RoomType roomType) {
        return roomTypeMapper.edit(roomType);
    }

    @Override
    public int delete(Long id) {
        return roomTypeMapper.delete(id);
    }

    @Override
    public List<RoomType> findList(Map<String, Object> queryMap) {
        return roomTypeMapper.findList(queryMap);
    }

    @Override
    public List<RoomType> findAll() {
        return roomTypeMapper.findAll();
    }

    @Override
    public Integer getTotal(Map<String, Object> queryMap) {
        return roomTypeMapper.getTotal(queryMap);
    }

    @Override
    public RoomType find(Long id) {
        return roomTypeMapper.find(id);
    }

    @Override
    public int updateNum(RoomType roomType) {
        return roomTypeMapper.updateNum(roomType);
    }
}
